<template>
  <div>
    <h2>son1</h2> 
    {{ this.$store.state.sex }} 
    {{ this.$store.state.hehe.name }} 
    {{ this.$store.state.xixi.age }} 
    <hr>
    {{ sex }}
    {{ name }}
    {{ age }}
    <hr>
    {{ dbName }}
    {{ dbAge }}
    </div>
</template>
<script>
import { mapState,mapGetters } from "vuex";
// mapState("可以忽略是模块名/命名空间",["映射的数组"])
export default {
  computed: {
    ...mapState(["sex"]),
    ...mapState("hehe",["name"]),
    ...mapState("xixi",["age"]),
    ...mapGetters("hehe",["dbName"]),
    ...mapGetters("xixi",["dbAge"]),
  }
}

</script>
